package javalearning.MultiThreads.demotest;

import java.util.Date;

public class ThreadControl extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(getName() + "--" + i + ", 日期： " + new Date());
            // 睡眠
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println();
        }
    }
}
